package com.sm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author Administrator
 */
@RestController
public class OrderController {
    @Autowired
    private RestTemplate restTemplate;

    @GetMapping(value = "/order/app-name")
    public String order() {
        String url = "http://localhost:9000/stock/";
        System.out.println(url);
        return restTemplate.getForObject(url,String.class);
    }
}
